/*
 * Copyright © 2022 eqxiu.com 北京中网易企秀科技有限公司  All rights reserved.
 */
package com.ls.pattern.factory.method.nvwa;

/**
 * @author liushuang
 * @version 1.0.0
 * @date 2022/4/6 13:59
 */
public class HumanFactory extends AbstractHumanFactory {

    @Override
    public <T extends Human> T createHuman(Class<T> humanClass) {
        try {
            return humanClass.newInstance();
        } catch (InstantiationException | IllegalAccessException e) {
            System.out.println("人种生成错误");
            e.printStackTrace();
        }
        return null;
    }
}
